﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kindohm.Life.Library
{
    public class Plant : TerminalLifeForm, IEdible
    {
        int nutrition;

        public static Plant Create()
        {
            Plant plant = new Plant();
            plant.Nutrition = NormalGenerator.Next(300, 60);
            plant.GrowInterval = NormalGenerator.Next(8, 2);
            plant.MaxHeartbeats = NormalGenerator.Next(40000, 4000);
            return plant;
        }

        public int Nutrition
        {
            get { return this.nutrition; }
            set { this.nutrition = value; }
        }

        public override void Grow()
        {
            int increase = NormalGenerator.Next(20,5);
            this.Nutrition = this.Nutrition + increase;
        }

        public override void BeEaten()
        {
            this.Nutrition = 0;
        }

        protected override void ProduceRemains(Point position)
        {
            //do nothing
        }

    }
}
